package cn.lanca.gof16_20._18observer.case2;

import java.util.Observer;

/**
 * project name:<font size="1"><b>小芄健康数据运营平台</b></font><br>
 * file name:<font size="1"><b>DictTemplate</b></font><br>
 * description:<font size="1"><b>平台字典数据操作实现类</b></font><br>
 * company name:<font size="1"><b>小芄医药科技（成都）有限公司-研发中心</b></font><br>
 *
 * @author <a href="mail to: ">mei.hongliang<br>
 * @version 1.0.0<br>
 * @since 2022/3/2 16:15  <br>
 */
public class Test {

    public static void main(String[] args) {

        OilFutures oil = new OilFutures();

        Bull bull = new Bull(); //多方
        Bear bear = new Bear(); //空方

        System.out.println("1");
        oil.addObserver(bull);
        oil.addObserver(bear);

        System.out.println("2");
        oil.setPrice(10);
        oil.setPrice(-8);
    }

}
